package com.hspedu.final_;

public class FinalExercise01 {
    public static void main(String[] args) {
        Circle circle = new Circle(2.0);
        System.out.println(circle.circularArea());
        System.out.println(Circle.area(2.0));
    }
}

class Circle{
    private double radius;
    private static double PI = 3.14;

    public Circle(double radius) {
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public double circularArea(){
        return PI * radius * radius;
    }
    //静态方法
    public static double area(double radius){
        return PI * radius * radius;
    }
}